<!--
 * @Description: 施组方案审核意见回复详情页
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2023-02-27 15:30:58
 * @LastEditTime: 2023-03-01 13:55:24
 * @FilePath: \cscec-pms-admin\src\views\technical\ShiGroup\reviewReply\reviewReplyDetail.vue
-->
<template>
  <base-breadcrumb>
    <!-- 基本信息及二次报审 -->
    <BaseInfo :useBaseInfo="true" />
    <!-- 基本信息及二次报审 -->
    <a-card v-if="(replyList || []).length > 0">
      <template v-for="item in replyList">
        <title-name :title="'回复' + item.nodeName + '信息'" :key="item.id" />
        <a-table
          :columns="columns"
          row-key="id"
          :data-source="item.opinionDTOList"
          :loading="loading"
          :pagination="false"
          bordered
          :key="item.id"
        />
        <div
          class="file-list" 
          :key="item.id"
        >
          <span>附件上传：</span>
          <file-link style="margin-top: 0;" :fileList="item.fileInfoVOS" />
        </div>
      </template>
    </a-card>
    <div class="tool-btns page-btn-right-top">
      <a-button
        v-checkVisibleInDetail
        type="primary"
        @click="$close()"
      >
        关闭
      </a-button>
    </div>
  </base-breadcrumb>
</template>
<script>
import BaseInfo from '@/views/technical/ShiGroup/Approval/EditFrom'
import { getReplyAuditApproval } from '@/api/technical/reviewReply'
import { columns } from './model.js'
export default {
  name: 'reviewReplyDetail' + Date.now(),
  components: {
    BaseInfo
  },
  data () {
    return {
      // 表头
      columns,
      // 加载中
      loading: false,
      // 回复信息
      replyList: []
    }
  },
  mounted(){
    this.getReplyMessage()
  },
  methods: {
    /**
     * @description: 获取变更信息
     * @return {void}
     */    
    getReplyMessage(){
      this.loading = true
      getReplyAuditApproval(this.$route.query.infoId).then((res)=>{
        if(res.code === this.SUCCESS_CODE){
          this.replyList = res.data.auditApprovalDTOS
        }else{
          this.replyList = []
        }
      }).finally(()=>{
        this.loading = false
      })
    }
  }
}
</script>
<style lang="less" scoped>
.file-list{
  display: flex;
  margin: 20px 0;
  align-items: center;
}
</style>
